<%@ page import="net.ifilm.common.Constants" %>
<%--
  Created by IntelliJ IDEA.
  User: wangjunneil@gmail.com
  Date: 13-12-17
  Time: 16:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/page/common/jsptag.jsp"%>
<html>
<head>
    <title></title>
    <link rel="stylesheet" href="<%=request.getContextPath() %>/bg/css/bg.css" type="text/css" />
    <script type="text/javascript" src="../../js/jquery-1.4.4.min.js"></script>
    <script type="text/javascript">
        function changeSexStatus() {
            var sexValue = $("#sexSelect").attr("value");
            $.ajax({type:'get', url:'changeSexStatus.html', data:'sexValue=' + sexValue});
        }

        function changelogStatus() {
            var logValue = $("#logSelect").attr("value");
            $.ajax({type:'get', url:'changelogStatus.html', data:'logValue=' + logValue});
        }

        function changePerformanceStatus() {
            var performanceValue = $("#performaceSelect").attr("value");
            $.ajax({type:'get', url:'changePerformanceStatus.html', data:'performanceValue=' + performanceValue});
        }
    </script>
</head>
<body>
    <div id="listDiv">
        <table id="filmTable">
            <thead>
                <tr>
                    <th width="200">名称</th>
                    <th width="400">值域</th>
                    <th>说明</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td align="center">SEX选项</td>
                    <td>
                        <select id="sexSelect" onchange="changeSexStatus();">
                            <option value="0" <c:if test="${switch}">selected</c:if>>开启</option>
                            <option value="1" <c:if test="${!switch}">selected</c:if>>关闭</option>
                        </select>
                    </td>
                    <td>是否显示色情电影的开关，默认为关闭</td>
                </tr>
                <tr>
                    <td align="center">日志级别</td>
                    <td>
                        <select id="logSelect" onchange="changelogStatus();">
                            <option value="1" <c:if test="${logLevel == 1}">selected</c:if>>DEBUG</option>
                            <option value="2" <c:if test="${logLevel == 2}">selected</c:if>>INFO</option>
                            <option value="3" <c:if test="${logLevel == 3}">selected</c:if>>WARN</option>
                            <option value="4" <c:if test="${logLevel == 4}">selected</c:if>>ERROR</option>
                        </select>
                    </td>
                    <td>程序运行时，动态更改系统日志级别，默认为DEBUG</td>
                </tr>
                <tr>
                    <td align="center">性能开关</td>
                    <td>
                        <select id="performaceSelect" onchange="changePerformanceStatus();">
                            <option value="0" <c:if test="${performance}">selected</c:if>>开启</option>
                            <option value="1" <c:if test="${!performance}">selected</c:if>>关闭</option>
                        </select>
                    </td>
                    <td>是否开启性能调试开关，默认为关闭</td>
                </tr>
            </tbody>
        </table>
    </div>
</body>
</html>